package com.jvm123.api.api.client

import com.jvm123.api.api.entity.Post
import feign.Headers
import feign.Param
import feign.RequestLine

/**
 *
 * @author yawn http://jvm123.com
 *     2019/11/30 14:43
 */
interface PostsClient {

    @RequestLine("GET /rest/post/{id}")
    Post get(@Param("id") Long id)

    @RequestLine("POST /rest/post/batch")
    @Headers("Content-Type: application/json")
    List<Post> page(@Param("page") int page, @Param("size") int size)

    @RequestLine("POST /rest/post/batch")
    @Headers("Content-Type: application/json")
    List<Post> page(@Param("offset") long offset)
}
